package blt.app_core.api.invoce;

import blt.app_core.api.base.bean.OAuth;
import blt.app_core.api.base.bean.State;
import blt.app_core.utils.UriProdiver;
import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by xgp on 2017/7/4.
 */

public interface InvoiceSerivce {

    @POST(UriProdiver.GET_INVOICE_LIST)
    @FormUrlEncoded
    Call<OAuth<InvoiceVo>> getInvoice(@Field("pageNum") int page, @Field("pageSize") int pageSize);

    @POST(UriProdiver.ＡPPLY_INVOICE)
    @FormUrlEncoded
    Call<State> applyInvoice(@Field("id") int id, @Field("travelIds") String travelIds, @Field("type") String type,
                             @Field("company") String company,
                             @Field("amount") int amount, @Field("content") String content,
                             @Field("contactUser") String contactUser,
                             @Field("contactAddress") String contactAddress, @Field("contactPhone") String contactPhone,
                             @Field("email") String email);

    @POST(UriProdiver.INVOICE_UPDATE)
    @FormUrlEncoded
    Call<State> updateInvoice(@Field("id") int id, @Field("travelIds") String travelIds, @Field("type") String type,
                              @Field("company") String company,
                              @Field("amount") int amount, @Field("content") String content,
                              @Field("contactUser") String contactUser,
                              @Field("contactAddress") String contactAddress, @Field("contactPhone") String contactPhone,
                              @Field("email") String email);


    @POST(UriProdiver.INVOICE_DETAIL)
    @FormUrlEncoded
    Call<State<InvoiceVo>> getInvoiceDetail(@Field("id") int id);

}
